package com.badu.app.domain;

import java.io.Serializable;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.Version;
import com.baomidou.mybatisplus.enums.IdType;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author astupidcoder123
 * @since 2021-01-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("app_coupon")
public class AppCoupon extends Model<AppCoupon> {

    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.UUID)
    private String id;
    private String createUser;
    private String updareUser;
    private Date createDate;
    private Date updateDate;
    /**
     * 0 代金券 1折扣券 2兑换券
     */
    private String couponType;
    /**
     * 优惠金额
     */
    private BigDecimal discountMoney;
    /**
     * 使用满足金额
     */
    private BigDecimal userMoney;
    /**
     * 发行数量
     */
    private Integer sendNum;
    /**
     * 领取数量
     */
    private Integer receiveNum;
    /**
     * 使用数量
     */
    private Integer useNum;
    private String couponName;
    private String couponMessage;
    /**
     * 生效开始时间
     */
    private Date startTime;
    /**
     * 生效结束时间
     */
    private Date endTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
